<template>
  <div class="pages">
    <div class="insp_box" style="border-top: 0.0625rem solid #e7ecf5">
      <div class="insp_box_nocell">
        <span>检查项目：</span>{{ reportInfo.itemName }}
      </div>
      <div class="insp_box_cell">
        <div><span>就诊人：</span>{{ reportInfo.patientName }}</div>
        <div><span>性别：</span>{{ reportInfo.patientSex=='0'?"女":"男" }}</div>
        <div><span>年龄：</span>{{ reportInfo.patientAge }}岁</div>
      </div>
    </div>
    <div class="insp_gip"></div>
    <div class="insp_box">
      <div class="insp_box_cell">
        <div><span>报告单号：</span>{{ info.reportId }}</div>
      </div>
      <div class="insp_box_cell">
        <div><span>开立科室：</span>{{ reportInfo.operdeptName }}</div>
        <div><span>报告日期：</span>{{ reportInfo.reportTime | sub }}</div>
      </div>
      <div class="insp_box_cell">
        <div><span>检查医生：</span>{{ reportInfo.doctorName }}</div>
        <div><span>检查科室：</span>{{ reportInfo.deptName }}</div>
      </div>

    </div>
    <div class="insp_gip"></div>
    <div class="insp_box">
      <div class="insp_box_cell" style="margin-bottom: 1.6875rem">
        <div class="name">检查说明：</div>
        <div class="msg">
          {{ reportInfo.seen }}
        </div>
      </div>
      <div class="insp_box_cell">
        <div class="name">检查诊断：</div>
        <div class="msg">
          {{ reportInfo.diagnosis }}
        </div>
      </div>
      <div class="insp_box_cell">
        <div class="name">检查方法：</div>
        <div class="msg">
          {{ reportInfo.itemName }}
        </div>
      </div>
    </div>
    <div class="insp_gip"></div>
<!--    <div class="insp_box">-->
<!--      <div class="insp_box_cell">-->
<!--        <div><span>检查医生：</span>{{ info.exeDoctorName }}</div>-->
<!--        <div><span>检查科室：</span>{{ info.exeDeptName }}</div>-->
<!--      </div>-->
<!--    </div>-->
<!--    <div class="bgBtn" @click="goBaoGao">报告影像图</div>-->
  </div>
</template>
<script>
import { getCheckReportInfo } from "@/api/api";
export default {
  components: {},
  data() {
    return {
      info: {},
      reportInfo: {},
    };
  },
  created() {
    if (this.$route.query) {
      this.info = this.$route.query;
      this.getCheckReportInfo(this.info.hospPatientId, this.info.reportId);
    }
  },
  methods: {
    getCheckReportInfo(hospPatientId, reportId) {
      var data = {
        hosId: "",
        hospPatientId,
        reportId,
      };
      getCheckReportInfo(data).then((res) => {
        if (res.code == 200) {
          // this.checkList = res.data.checkList.detail;
          this.reportInfo = res.data;
        }
      });
    },
    goBaoGao() {
      this.$router.push({ path: "/baogao" });
    },
  },
  filters: {
    sub(val) {
      if (val) {
        var str = val.substring(0, 10);
        return str;
      }


    },
  },
};
</script>
<style scoped>
.insp_box {
  width: calc(100% - 2rem);
  padding: 1.125rem 1rem;
  font-size: 0.9375rem;
  background-color: #fff;
}

.insp_box_nocell > span {
  color: #949fb4;
  font-size: 0.875rem;
}

.insp_box_cell {
  display: flex;
  justify-content: space-between;
  /* align-items: center; */
}

.insp_box_cell > div > span {
  color: #949fb4;
  font-size: 0.875rem;
}

.insp_gip {
  width: 100%;
  height: 0.625rem;
  background: rgba(247, 250, 253, 1);
}

.insp_box_cell .name {
  font-size: 0.875rem;
  color: #949fb4;
  width: 4.375rem;
}

.insp_box_cell .msg {
  width: calc(100% - 4.375rem);
  font-size: 0.9375rem;
}
.bgBtn {
  width: calc(100% - 32px);
  height: 44px;
  background: #ffffff;
  border: 1px solid #448eff;
  border-radius: 3px;
  text-align: center;
  line-height: 44px;
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: bold;
  color: #448eff;
  margin: 0 16px;
  margin: 16px auto;
}
</style>
